//
// Created by Administrator on 2024/7/29.
//

#ifndef JTT80_SUB_BODY_H
#define JTT80_SUB_BODY_H
#include "../../interfaces/base.h"

namespace protocol {
    class JTT809SubBody : public Sizeable, public Serializable, public ToString {
    public:
        unsigned short msgId{};
        bool skipDataLength = false;

        JTT809SubBody() = default;

        explicit JTT809SubBody(const unsigned short msg_id)
            : msgId(msg_id) {
        }

        JTT809SubBody(const JTT809SubBody &other) = default;

        JTT809SubBody & operator=(const JTT809SubBody &other) = default;

    protected:
        [[nodiscard]] size_t _size_() const override { return sizeof(msgId); }

    public:
        ~JTT809SubBody() override = default;

        void serialize(MessagePackWriter &writer) override {}

        void deserialize(MessagePackReader &reader) override {}

        [[nodiscard]] std::string toString() const override { return "JTT809SubBody"; }
    };
}

#endif //JTT80_SUB_BODY_H
